<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<jsp:include page="../head.jsp"></jsp:include>
<body>
<form id='fmTbProductType'  action='TbProductTypeServlet?method=${sessionScope.tbProductType==null?'add':'edit'}' method='post'>
<input type='hidden' name='productTypeId' id='productTypeId' value='${sessionScope.tbProductType.productTypeId }' />
<table>
<tr><td colspan='2'></td></tr>
<tr>
    <td>类型名称</td>
    <td><input type='text' name='productTypeName' id='productTypeName' value='${sessionScope.tbProductType.productTypeName }' /></td>
</tr>
<tr>
    <td>父级类型</td>
    <td>
        <div>
    <select name='parentTypeId' id='parentTypeId' >
    <option value='0' selected >无</option>
	<c:forEach items="${sessionScope.tbProductTypeList}" var="tbParentType" varStatus="status">
		<option value="${tbParentType.productTypeId }" ${sessionScope.tbProductType.parentTypeId== tbParentType.productTypeId?' selected ':''}>${tbParentType.productTypeName}</option>
	</c:forEach>
</select>
</div>
    </td>
</tr>
<tr>
    <td>类型备注</td>
    <td><input type='text' name='productTypeMemo' id='productTypeMemo' value='${sessionScope.tbProductType.productTypeMemo }' /></td>
</tr>
<tr>
    <td align="center" colspan='2' ><input type="submit" name="btsubmit" id="btsubmit" value="${sessionScope.tbProductType==null?'添加':'修改'}" /><input type='reset' value='重置' /><input type='button' value='返回' onclick='history.go(-1);' /></td>
</tr></table>
</form><jsp:include page="../foot.jsp"></jsp:include>
</body></html>